package com.smart.enums;

public enum BatchSendListStateEnum {
    NO_SEND(0,"未派券"),
    HAS_SEND(1,"已派券"),
    ERROR(2,"派券失败");


    private int code;
    private String name;
    BatchSendListStateEnum(int code, String name){
        this.code = code;
        this.name = name;
    }

    public static String getName(int code){
        for (BatchSendListStateEnum obj : BatchSendListStateEnum.values()) {
            if(obj.getCode() == code){
                return obj.getName();
            }
        }
        return "";
    }

    public String getName() {
        return name;
    }

    public int getCode() {
        return code;
    }
}
